package com.project.weimi.activity;

import com.project.weimi.R;
import com.project.weimi.widget.ToastMessage;

import android.os.Bundle;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.CompoundButton;
import android.widget.RelativeLayout;
import android.widget.ToggleButton;

public class NewMsgSettingActivity extends BaseActivity {

	private ToggleButton toggleBtn_invitation_reply, toggleBtn_huitie_reply, toggleBtn_pinglun_reply,
			toggleBtn_stranger, toggleBtn_disturb_time;
	private RelativeLayout rl_privateletter_blacklist;

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentViewWithBar(R.layout.activity_new_message_setting, "消息设置");

		initView();

	}

	private void initView() {
		toggleBtn_invitation_reply = (ToggleButton) findViewById(R.id.toggleBtn_invitation_reply);
		toggleBtn_huitie_reply = (ToggleButton) findViewById(R.id.toggleBtn_huitie_reply);
		toggleBtn_pinglun_reply = (ToggleButton) findViewById(R.id.toggleBtn_pinglun_reply);
		toggleBtn_stranger = (ToggleButton) findViewById(R.id.toggleBtn_stranger);
		toggleBtn_disturb_time = (ToggleButton) findViewById(R.id.toggleBtn_disturb_time);
		rl_privateletter_blacklist = (RelativeLayout) findViewById(R.id.rl_privateletter_blacklist);

		// 监听
		toggleBtn_invitation_reply.setOnCheckedChangeListener(changeListener);
		toggleBtn_huitie_reply.setOnCheckedChangeListener(changeListener);
		toggleBtn_pinglun_reply.setOnCheckedChangeListener(changeListener);
		toggleBtn_stranger.setOnCheckedChangeListener(changeListener);
		toggleBtn_disturb_time.setOnCheckedChangeListener(changeListener);

	}

	private OnCheckedChangeListener changeListener = new OnCheckedChangeListener() {

		@Override
		public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
			
//			if(toggleBtn_invitation_reply.isChecked()){
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "帖子被回复--已开启");
//			} else {
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "帖子被回复--已关闭");
//			}
//			
//			if(toggleBtn_huitie_reply.isChecked()){
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "回帖被回复--已开启");
//			} else {
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "回帖被回复--已关闭");
//			}
//			
//			if(toggleBtn_pinglun_reply.isChecked()){
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "评论被回复--已开启");
//			} else {
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "评论被回复--已关闭");
//			}
//			
//			if(toggleBtn_stranger.isChecked()){
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "陌生人打招呼--已开启");
//			} else {
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "陌生人打招呼--已关闭");
//			}
//			
//			if(toggleBtn_disturb_time.isChecked()){
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "免打扰时段--已开启");
//			} else {
//				ToastMessage.showMyToast(NewMsgSettingActivity.this, "免打扰时段--已关闭");
//			}
			
			
		}
	};

	@Override
	void setStatusBar(int statusBarColorRes) {
		super.setStatusBar(R.color.transparent_3);
	}

	
}
